package com.atxiaodei.kabudashejimoshi.工厂模式.简单工厂;

/**
 * @ClassName CourseFactory
 * @Deacription 创建 CourseFactory 工厂类
 * @Author 卡布达
 * @Date 2021/10/11 23:38
 * @Version 1.0
 **/
public class CourseFactory {
    public ICourse create(String name){
        if("java".equals(name)){
            return new JavaCourse();
        }else if("python".equals(name)){
            return new PythonCourse();
        }else {
            return null;
        }
    }
}
